package cn.javaxxw.zxing.spring.boot;

import cn.javaxxw.zxing.spring.boot.template.BarCodeTemplate;
import cn.javaxxw.zxing.spring.boot.template.QrCodeColorTemplate;
import cn.javaxxw.zxing.spring.boot.template.QrCodeTemplate;
import com.google.zxing.common.BitMatrix;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 功能描述: 
 * @author  Trazen
 * @date  2021/1/21 14:18
 */
@Configuration
@ConditionalOnClass(BitMatrix.class)
public class ZxingAutoConfiguration  {

    @Bean
    public QrCodeTemplate qrcodeTemplate() {
        return new QrCodeTemplate();
    }

    @Bean
    public BarCodeTemplate barCodeTemplate(){
        return new BarCodeTemplate();
    }

    @Bean
    public QrCodeColorTemplate qrCodeColorTemplate(){
        return new QrCodeColorTemplate();
    }
}
